how to deal with error in google apps script